package com.tql.mall.cart.client;

import com.tql.mall.cart.client.impl.CartDegradeFeignClient;
import com.tql.mall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @Author: tyk
 * @Date: 2023/5/26 12:15
 * @Description:
 */
@FeignClient(value = "service-cart", fallback = CartDegradeFeignClient.class)
public interface CartFeignClient {

    /**
     * 获取选中的商品列表
     */
    @GetMapping("api/cart/inner/getCartCheckedList/{userId}")
    List<CartInfo> getCartCheckedList(@PathVariable String userId);

    @GetMapping("api/cart/inner/deleteCartCheckedList/{userId}")
    void deleteCartCheckedList(@PathVariable String userId);
}
